<template>
  <div>
    <el-table ref="table" :data="tableData" border>
      <el-table-column align="center" prop="serCode" label="物料编码" width="200" />
      <el-table-column align="center" prop="serName" label="物料名称" />
      <el-table-column align="center" prop="Amount" width="150" label="累计验工计价金额" />
      <el-table-column label="操作" align="center" width="200">
        <template slot-scope="scope">
          <el-button class="pms-button-primary operate-btn" @click="openDetail(scope.row)">
            配置明细
          </el-button>
          <el-button class="pms-button-primary operate-btn" @click="openDetail(scope.row)">
            查看
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <ServiceConfigDetails ref="sevConfigDetailsDialog" />
  </div>
</template>

<script>
import ServiceConfigDetails from '@/views/acceptanceManagement/servicecodeDetailConfig/ServiceConfigDetails'
export default {
  name: 'ServicecodeList',
  components: {
    ServiceConfigDetails
  },
  data() {
    return {
      tableData: []
    }
  },
  methods: {
    getList() {
      this.tableData = [{
          serCode: '9030010305000000000545',
          serName: '施工-宏站-存量整治-外市电引入-天线数量1个-0.35AKN/m2-2t-30',
          Amount: '0.01'
        },
        {
          serCode: '9030010305000000000545',
          serName: '施工-宏站-存量整治-外市电引入-天线数量1个-0.35AKN/m2-2t-30',
          Amount: '0.01'
        },
        {
          serCode: '9030010305000000000545',
          serName: '施工-宏站-存量整治-外市电引入-天线数量1个-0.35AKN/m2-2t-30',
          Amount: '0.01'
        },
        {
          serCode: '9030010305000000000545',
          serName: '施工-宏站-存量整治-外市电引入-天线数量1个-0.35AKN/m2-2t-30',
          Amount: '0.01'
        }, {
          serCode: '9030010305000000000545',
          serName: '施工-宏站-存量整治-外市电引入-天线数量1个-0.35AKN/m2-2t-30',
          Amount: '0.01'
        }]
    },
    openDetail() {
      this.$refs.sevConfigDetailsDialog.dialogVisible = true
    },
    handleDolayout() {
      this.$nextTick(() => {
        this.$refs.table.doLayout()
      })
    }
  }
}
</script>
<style lang="scss">
.operate-btn {
  min-width: 70px;
}
</style>
